﻿// owner 蒋家伟

#pragma once
#include "WeakReference.h"

namespace jsdk
{
    class IArgs;
    class IHandler;
    // 事件基类
    // note ： 属于同步事件而非异步
    class MODELBASE_EXPORT IEvent : public WeakReference
    {
    public:
        virtual ~IEvent() {}

        virtual bool registerHandler(IHandler* pHandler) = 0;

        virtual bool unRegisterHandler(IHandler* pHandler) = 0;

        virtual void sendEvent(const IArgs* upArgs) = 0;
    };
}